﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TrianglerPerimeterCalculator
{
    class Point
    {
        private float x;
        private float y;

        public Point()
        {
            x = 0f;
            y = 0f;
        }

        public Point(float x, float y)
        {
            this.x = x;
            this.y = y;
        }

        public Point(Point P)
        {
            this.x = P.x;
            this.y = P.y;
        }

        public String toString()
        {
            String temp = "(" + this.x + "," + this.y + ")";
            return temp;
        }

        public double distance(Point P)
        {
            double res = Math.Sqrt((this.x-P.x)*(this.x-P.x)+(this.y-P.y)*(this.y-P.y));
            return res;
        }
    }
}
